package com.changan.exception;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 项目名:    xinguan-parent
 * 类名称:      BusinessException
 * 创建人:     xsy
 * 类描述:
 * 创建时间:    2021/8/27 10:26
 * Version:    1.0
 */

/*
只有运行时得异常我们才可以捕获并且处理
 */
@Data
@AllArgsConstructor //有参
@NoArgsConstructor  //无参
public class BusinessException extends RuntimeException{

    @ApiModelProperty(value = "状态码")
    private Integer code;

    @ApiModelProperty(value = "错误信息")
    private String errMsg;
}
